module.exports = function(grunt){
    grunt.initConfig({
        pkg : grunt.file.readJSON("package.json"),
        coffee : {
            options : {
                seperator: "\n",
                join : true
            },
            compile : {
                files : {
                    "draw.js" : ["src/lib/**/*.coffee"], 
                    "main.js" : ["src/screen.coffee", "src/entity.coffee","src/tile.coffee", "src/item.coffee", "src/*.coffee"]
                }    
            }
        },
        concat : {
            options : {
                seperator : ";"
            },
            dist: {
                src: ['src/lib/minheap.js','draw.js', 'main.js'],
                dest: 'app.js'
            }
        },
        watch : {
            options : {
                livereload : true
            }, 
            files : ["main.html", "Gruntfile.js", "src/**/*.coffee", "src/*.coffee", "img/**/*.png", "img/*.png"],
            tasks : ["coffee", "concat"]
        }
    });

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-coffee');

    grunt.registerTask('default', ['coffee', 'concat', 'watch']);
}